<?php
	if ($_GET["appender"] == "true" AND file_exists(path_compl($_POST["doc_path"]).$_POST["doc_title"])){
		$compl = don3_plus_one($_POST["doc_title"],path_compl($_POST["doc_path"]));
	} else {
		$compl = path_compl($_POST["doc_path"]).$_POST["doc_title"];
	}
	$putter = file_put_contents($compl, str_replace('\"', '"', $_POST["doc_content"]));
	if ($putter >= 1){
		if (!@chmod($compl, 0777)) oyster_log("ERROR", (string)$language->log_msgs->value_11, "Editor safe");
		oyster_log("SUCCESS", (string)$language->stati->value_8, "Editor safe");
		$head->_template_assign("STATUS", (string)$language->stati->value_8);
	} else {
		$head->_template_assign("ERROR", (string)$language->errors->value_19);
	}
	$ordner = $_POST["doc_path"];
	$included = true;
	include("System/Kernel/Includes/index.include.php");
?>